package org.pisces.cas.action;

import javax.servlet.http.HttpServletRequest;

import org.apereo.cas.web.support.WebUtils;
import org.springframework.webflow.action.AbstractAction;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;

/**
 * This is {@link ValidateCaptchaAction}.
 *
 * @author Misagh Moayyed
 * @since 5.0.0
 */
public class MyValidateAction extends AbstractAction {

	@Override
	protected Event doExecute(RequestContext requestContext) throws Exception {
		boolean checkCode = true; // 缓存中获取 ip 错误次数
		if (checkCode) {
			final HttpServletRequest request = WebUtils.getHttpServletRequest(requestContext);
			System.out.println(request.getParameter("code"));
			// 校验code
			return null;
		}

		return null;
	}


}
